package com.mars.module.admin.entity;

import cn.afterturn.easypoi.excel.annotation.Excel;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Builder;
import lombok.Data;
import lombok.experimental.Accessors;

import java.math.BigDecimal;
import java.time.LocalDate;

/**
 * 商品对象 sys_product
 *
 * @author mars
 * @date 2024-01-24
 */

@Data
@ApiModel(value = "商品对象")
@Accessors(chain = true)
@TableName("sys_product")
public class SysProduct {

    /**
     * 主键ID
     */
    @TableId(value = "id", type = IdType.AUTO)
    @JsonFormat(shape = JsonFormat.Shape.STRING)
    @ApiModelProperty(value = "id")
    private Long id;
    /**
     * 商品名称
     */
    @Excel(name = "商品名称")
    @ApiModelProperty(value = "商品名称")
    private String name;
    /**
     * 分类ID
     */
    @Excel(name = "分类ID")
    @JsonFormat(shape = JsonFormat.Shape.STRING)
    @ApiModelProperty(value = "分类ID")
    private String classId;

    @Excel(name = "分类名称")
    @TableField(exist = false)
    private String className;
    /**
     * 店铺ID
     */
    @Excel(name = "店铺ID")
    @JsonFormat(shape = JsonFormat.Shape.STRING)
    @ApiModelProperty(value = "店铺ID")
    private Long shopId;

    @Excel(name = "店铺名称")
    @TableField(exist = false)
    private String shopName;
    /**
     * 图片
     */
    @Excel(name = "图片")
    @ApiModelProperty(value = "图片")
    private String picture;
    /**
     * 生产日期
     */
    @Excel(name = "生产日期")
    @ApiModelProperty(value = "生产日期")
    private LocalDate manufactureDate;
    /**
     * 库存数量
     */
    @Excel(name = "库存数量")
    @ApiModelProperty(value = "库存数量")
    private Integer inventory;
    /**
     * 保质期
     */
    @Excel(name = "保质期")
    @ApiModelProperty(value = "保质期")
    private String shelfLife;
    /**
     * 商品单价（元）
     */
    @Excel(name = "商品单价")
    @ApiModelProperty(value = "商品单价（元）")
    private BigDecimal price;
    /**
     * 商品状态
     */
    @Excel(name = "商品状态")
    @ApiModelProperty(value = "商品状态")
    private String status;

    @TableField(exist = false)
    @ApiModelProperty(value = "数量")
    private Integer amount;

    @TableField(exist = false)
    @ApiModelProperty(value = "是否收藏：1-是 0-否")
    private String isCollect;

    @ApiModelProperty(value = "是否删除")
    private String deleted;

}
